{% extends "base.html" %}

{% block js %}

<script src="/static/js/ajax.js"></script>

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

$('form').submit(function(){
    obj = $(this);
    doPost(obj, obj.attr('action'), obj.serializeArray(), function(obj, data){
        alert('创建成功');
    });
    return false;
});

});
</script>
{% endblock %}

{% block menu %}
{% endblock %}

{% block content %}
<form action='/contacts' method='post'>
    姓名:<input name='name' type='text'><br>
    公司:<input name='company' type='text'><br>
    电话:<input name='phone' type='text'><br>
    邮箱:<input name='email' type='text'><br>
    <input type='submit' value='submit'>
</form>
{% endblock %}
